﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class CreateUvSphereMenu 
{
    [MenuItem("Assets/Create/UV Sphere 72x48")]
    public static void Create72x48UvSphere()
    {
        CreateUvSphere(72, 48);
    }

    static void CreateUvSphere(int segments, int rings)
    {
        string fileName = "UV Sphere " + segments + "x" + rings;

        var mesh = UvSphereTool.CreateUvSphere(72, 48);
        AssetDatabase.CreateAsset(mesh, "Assets/Sphere Models/" + fileName + ".mesh");
        AssetDatabase.SaveAssets();
        //AssetDatabase.CreateAsset(mesh, )
    }
}
